/************************************************************************
 *
 * string.h
 *
 * (c) Copyright 1996-2004 Analog Devices, Inc.  All rights reserved.
 * $Revision: 1.1 $
 ************************************************************************/

#pragma once
#ifndef __NO_BUILTIN
#pragma system_header /* string.h */
#endif

#ifndef __STRING_DEFINED
#define __STRING_DEFINED

#ifndef _YVALS
 #include <yvals.h>
#endif


#ifdef __TS_BYTE_ADDRESS
#include <byteaddrdef.h>
#endif

#ifndef NULL
  #ifdef __cplusplus
    #define NULL	0
  #else
    #define NULL	((void *)0)
  #endif
#endif

#if !defined(__SIZE_T_DEFINED) && !defined(_SIZET)
  #define __SIZE_T_DEFINED
  #define _SIZET
  typedef _Sizet size_t;
#endif

#ifdef __cplusplus
  extern "C" {
#endif

void  *__builtin_memcpy(void *, const void *, size_t);
void  *memcpy(void *, const void *, size_t);
void  *__builtin_memmove(void *, const void *, size_t);
void  *memmove(void *, const void *, size_t);
int    memcmp(const void *, const void *, size_t);
void  *memchr(const void *, int, size_t);
void  *memset(void *, int, size_t);

char *__builtin_strcpy(char *, const char *);
char  *strcpy(char *, const char *);
char  *strncpy(char *, const char *, size_t);
char  *strcat(char *, const char *);
char  *strncat(char *, const char *, size_t);
int    strcmp(const char *, const char *);
int    strncmp(const char *, const char *, size_t);
int    strcoll(const char *, const char *);
size_t strxfrm(char *, const char *, size_t);
char  *strchr(const char *, int);
char  *strrchr(const char *, int);
size_t strspn(const char *, const char *);
size_t strcspn(const char *, const char *);
char  *strpbrk(const char *, const char *);
char  *strstr(const char *, const char *);
char  *strtok(char *, const char *);
size_t __builtin_strlen(const char *);
size_t strlen(const char *);
char  *strerror(int);

#if !defined(__NO_BUILTIN)
#ifdef __TS_BYTE_ADDRESS
#define strcpy_ba  __builtin_strcpy
#define strlen_ba __builtin_strlen
#define memcpy_ba __builtin_memcpy
#define memmove_ba __builtin_memmove
#else
#define strcpy  __builtin_strcpy
#define strlen __builtin_strlen
#define memcpy __builtin_memcpy
#define memmove __builtin_memmove
#endif
#endif

#ifdef __cplusplus
  }
#endif

#endif /* __STRING_DEFINED */
